class Stack():
    def __init__(self):
        self.items=[]

    # 判断栈是否为空
    def isEmpty(self):
        return len(self.items)==0

    # 把数据放入栈
    def push(self,item):
        self.items.append(item)

    # 从栈中取数据
    def pop(self):
        return self.items.pop()

    # 栈顶
    def peek(self):
        return self.items[-1]

    # 栈的长度
    def size(self):
        return len(self.items)

def divideBy2(desc_number):
    sobj=Stack()

    while desc_number>0:
        # 求余数
        rem=desc_number % 2

        sobj.push(rem)
        # 整数数
        desc_number=desc_number // 2

    bin_string = ''
    while not sobj.isEmpty():
        bin_string += str(sobj.pop())

    return bin_string

if __name__ == '__main__':
    print(divideBy2(5))
    # print(divideBy2(42))